package com.freelancer.musicinstruction.services.exceptions;

public class ServiceCallException extends Exception {

	private static final long serialVersionUID = 2112342284726998286L;

	private String description;
	
	private String errorCode;
	
	public ServiceCallException(){
		
	}
	
	public ServiceCallException( String message ){
		super( message );
	}
	
	public ServiceCallException( Throwable throwable ){
		super( throwable );
	}
	
	public ServiceCallException( String message, Throwable throwable ){
		super( message, throwable );
	}
	
	public ServiceCallException( String error, String description ){
		super( error );
		this.description = description;
	}
	
	public ServiceCallException( String error, String description, String errorCode ){
		super( error );
		this.errorCode = errorCode;
		this.description = description;
	}
	
	

	public String getDescription() {
		if( description != null )
			return description;
		else
			return getMessage();
	}
}
